﻿using System;
using System.Collections.Generic;
using System.Text;

namespace dotHTML.HTML {
    /// <summary>
    /// Represents an item in a list.
    /// </summary>
    [Serializable]
    public class Li : Element {

        private ListTypeChoices? _type;
        private int? _value;

        /// <summary>
        /// Determines the delimiter for this list element.
        /// </summary>
        [Obsolete("Deprecated in HTML4 - use CSS instead.")]
        public ListTypeChoices? Type {
            get { return _type; }
            set { _type = value; }
        }

        /// <summary>
        /// Determines the numerical value of this item in the list.
        /// </summary>
        public int? Value {
            get { return _value; }
            set { _value = value; }
        }

        /// <summary>
        /// Gets a formatted string of all local attributes of this element
        /// (not including the base attributes).
        /// </summary>
        /// <param name="sb">The StringBuilder to write this element's
        /// attribute data to.</param>
        protected override void WriteLocalAttributes(StringBuilder sb) {
            AttributeWriter.Write(sb, (char?)_type, "type");
            AttributeWriter.Write(sb, _value, "value");
        }
    }
}
